{% load cache %}
{% cache 600 dataset-card dataset.name table.name %}
<div class="col s12 m6 l4 unselectable">
  <div class="card small hoverable">
    <div class="card-content-horizontal activator">
      <div class="center">
        <i class="material-icons icon-dataset">{{ dataset.icon }}</i>
      </div>
      <h3 class="card-title activator">{{ dataset.name }}</h3>
      <p class="activator">{{ dataset.description }}</p>
      <div class="center activator">
        <span class="black-text">
          <i class="material-icons">keyboard_arrow_up</i>
        </span>
      </div>
    </div>
    <div class="card-reveal grey lighten-5">
      <i class="material-icons icon-dataset">{{ dataset.icon }}</i>
      <span class="card-title grey-text text-darken-4">Tabelas<i class="material-icons right">close</i></span>
      <span class="subtitle-tables">{{ dataset.name }}</span>
      <div class="links">
        {% for table in dataset.tables %}
        {% spaceless %}
        <a href="{% url 'core:dataset-table-detail' dataset.slug table.name %}">
          {% if table.default %}<b>{{ table.name }}</b>
          {% else %}
          {{ table.name }}
          {% endif %}
        </a>
        {% endspaceless %}{% if not forloop.last %} {% endif %}
        {% endfor %}
      </div>
    </div>
  </div>
</div>
{% endcache %}